package com.showcai.module.result;

/**
 * Created by Baggio on 2018-6-29.
 */
public enum ReturnCode {
    NORMAL("正常", 0),
    FAILED("失败", -1),
    EXCEPTION("系统异常", -2),
    SESSION_INVALID("session失效", -100),
    SUCCESSFULLY("成功", 1),
    INVALID_REQUEST("非法请求", 2),
    REQ_MORE("请求太频繁", 3),

    VERSION_NORMAL("标准版本", 11),
    VERSION_HIGH("建议更新", 12),
    VERSION_MUST("强制更新版本", 13),
    VERSION_ERROR("错误的版本号", 14),

    ERROR_PWD("密码错误", 17),
    ERROR_LOGINNAMEPWD("用户名或密码错误", 18),
    INVALID_session("时间过长，请重新登录", 19),
    INVALID_loginName("登录名重复", 21),

    USER_STATUS_ERROR("您的账号异常", 25),
    CODE_MOREOVER_TIMES("验证码超出次数", 26),
    ERROR_CODE("验证码错误", 27),
    USER_NOEXISTS("用户不存在", 102),
    PRICING_ERROR_PARAM("提交数据错误", 200),
    PRICING_NO_RULE("没有权限", 201),

    LINE_PASSWORD_ERROR("您输入的账号密码有误！", 401);
    /** 线下激活流程 End zsg **/
    private String msg;
    private int code;

    ReturnCode(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }

    public ReturnCode setCode(int code) {
        this.code = code;
        return this;
    }

}
